package com.kanshu.ksgb.fastread.doudou.module.makemoney.retrofit;

import com.kanshu.ksgb.fastread.doudou.common.net.bean.BaseResult;
import com.kanshu.ksgb.fastread.doudou.common.net.bean.PageRequestParams;
import com.kanshu.ksgb.fastread.doudou.common.net.retrofit.FormObjConverterFactory;
import com.kanshu.ksgb.fastread.doudou.common.net.retrofit.Obj;
import com.kanshu.ksgb.fastread.doudou.module.makemoney.bean.ApprenticeBean;
import com.kanshu.ksgb.fastread.doudou.module.makemoney.bean.AutoReceiveBean;
import com.kanshu.ksgb.fastread.doudou.module.makemoney.bean.EverydayBean;
import com.kanshu.ksgb.fastread.doudou.module.makemoney.bean.InvitationBean;
import com.kanshu.ksgb.fastread.doudou.module.makemoney.bean.WeeklyBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by wcy on 18/5/29.
 */

public interface MakeMoneyService {
    @FormUrlEncoded
    @POST("app/task/readtime")
    Observable<ResponseBody> uploadReadTime(@FieldMap Map<String, String> map);
    @GET("app/task/day")
    Observable<BaseResult<EverydayBean>> getEverydayInfo();
    @GET("app/task/week")
    Observable<BaseResult<WeeklyBean>> getWeeklyInfo();
    // 获取徒弟信息列表
    @GET("app/userdisciple/lists")
    Observable<BaseResult<List<ApprenticeBean>>> getApprenticeList(@Query(value = FormObjConverterFactory.PLACEHOLDER) @Obj PageRequestParams params);
    // 获取用户邀请码
    @GET("app/user/invitationcode")
    Observable<BaseResult<InvitationBean>> getInvitationInfo();
    // 领取任务
    @FormUrlEncoded
    @POST("app/task/receive")
    Observable<ResponseBody> receiveTask(@FieldMap Map<String, String> map);
    // 获取通知
    @GET("app/userdisciple/notify")
    Observable<BaseResult<List<String>>> getNotifyList();
    // 自动领取任务
    @FormUrlEncoded
    @POST("app/task/autoReceive")
    Observable<BaseResult<AutoReceiveBean>> getAutoReceiveTask(@FieldMap Map<String, String> map);
}
